package com.user.service.impl;

import com.user.dao.UserDao;
import com.user.service.UserService;
import com.wukc.springcloud.domain.user.Role;
import com.wukc.springcloud.domain.user.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: wukc
 * @Description: TODO
 * @DateTime: 2022/9/1 14:46
 **/
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;

    public int createUser(User user)
    {
        return userDao.createUser(user);
    }

    public User getUserById(Long id)
    {
        return userDao.getUserById(id);
    }

    @Override
    public User getUserByName(String userName) {
        return userDao.getUserByName(userName);
    }

    @Override
    public User loadUserByUsername(String userName) {
        return null;
    }

    @Override
    public List<Role> getUserRolesByUid(Integer id) {
        return null;
    }

}
